1. Field of the Invention
The present invention relates to a method and an apparatus for controlling a robot which has a floating hand for picking up a workpiece.
2. Discussion of the Prior Art
A robot having a floating hand is used to pick up workpieces which are piled up in a box. An example of such robot is disclosed in the Japanese utility model publication 59-173591. The robot is provided with a hand having an electric magnet, and the hand is attached to the wrist portion of the arm through a floating mechanism which allows the hand to swing in three dimensions. Using the floating hand, the workpieces can be picked up even if the postures of the workpieces are different from each other.
Such robot is also combined with a vision system to pick up workpieces. FIG. 1 (a) shows a method of picking up workpieces 22 from a box 21. During such picking up operation, the hand 62 interferes with a side wall of a box 21 when the robot picks up a workpiece 22 located near to the side wall of the box 21 by a downward movement of the hand 62 along a vertical direction A. Although this problem can be overcome by moving the hand 62 along an inclined direction B, the hand 62 may swing down from its center position, as indicated by a solid line in FIG. 1 (b), if the posture of the hand 62 is controlled taking no account of the direction of the floating plane FLP of the hand 62. This causes a position difference between a target holding position P1 and actual holding position P2 at which the workpiece is held. The position error then produces weight imbalance by which the workpiece may fall off from the hand 62.